using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Text.RegularExpressions;

namespace TST.SharePoint.Shared
{
    public class WSSFieldFile : FieldFile
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public WSSFieldFile()
        {
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="ID">The ID for the field.</param>
        public WSSFieldFile(string Id)
            : base(Id)
        {
        }

        public override object GetTypedValue(object value)
        {
            if (value == null)
                return null;
            return Regex.Replace(value.ToString(), "^[0-9]+;#", "");
        }

    }
}
